package com.wuchao.controller;

import com.wuchao.entity.User;
import com.wuchao.service.serviceImpl.ServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

/**
 * @Author wuchao66
 * @Date 2022/7/5 14:19
 * @Version 1.0
 */
@WebServlet(name = "Servletpageinfo",urlPatterns = "/Servletpageinfo")
//注解 标注解释说明
public class Servletpageinfo extends HttpServlet {//中转页的协议
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();//文件流

        out.flush();
        out.close();
    }
//默认get
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html;charset=utf-8");
       // HttpSession session = (HttpSession)request.getSession();
        PrintWriter out = response.getWriter();//文件流
        request.getRequestDispatcher("/pageinfo/page.jsp").forward(request,response);
        out.flush();
        out.close();

    }
}
